<?php
if(!isset($_SESSION)) 
	{ 
		session_start(); 
	}
if(isset($_GET['check'])){
 	$_SESSION['check']=$_GET['check'];
}
$check=$_SESSION['check'];

$listapprove=$_SESSION['listapprove'];
$mangone=array();


$listapprove[$_GET['q']]=$mangone;

echo "<table width='100%' class='templ' cellspacing='0'>
            <tr class='titapp titapp2'>
                               	  <td></td>
                                	<td>Order</td>
                                	<td><div align='center'><img src='images/approve.png' alt='' width='12px' style='float:left; border:1px solid #eee' />Approver</div></td>
                                	<td><div align='center'><img src='images/reference.png' alt='' width='12px' style='float:left; border:1px solid #eee' />Reference</div></td>
                           	  </tr>";
$i=1;
foreach ($listapprove as $approve=>$abc){
	
    echo "                         <tr>
                               	  <td><input type='radio' name='ra_app' value='1' onclick='handler(this.value)'/></td>
                                  <td>".$i."</td>";
    
       echo"                           <td>".$approve."</td>";
        echo"                          <td>";
                                  foreach ($abc as $hienthi){
                                  		for ($j=0;$j<count($hienthi);$j++)
                                  		echo"<div><a href=''><img src='images/del.png' alt='' width='10px' style='border:1px solid #eee; margin-right:10px' /></a>".$hienthi[$j]."</div>";
                                  }             
                                  echo"</td>";
       echo                    "   </tr>";
                              
                              $i++;
}                              
                              
echo "                         <tr class='titapp titapp22'>
                               	  <td colspan='4'><div align='center'>
                               	    <input type='button' value='Delete' class='btnupbg btnupload' />
                           	      </div></td>
                           	  </tr>
                          </table>";
	$_SESSION['listapprove']=$listapprove;
?>